package com.huabo.contract.mysql.entity;

import java.math.BigDecimal;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Transient;

import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author huabo
 * @since 2021-10-23
 * 
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("TBL_FLOW")
@ApiModel(value="TblFlow对象", description="")
public class TblFlowMySql implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "流程ID")
    @TableId("FLOWID")
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "select HIBERNATE_SEQUENCE.nextval from dual")
    private BigDecimal flowid;

      @ApiModelProperty(value = "流程编号")
      @TableField("FLOWNUMBER")
    private String flownumber;

      @ApiModelProperty(value = "流程名称")
      @TableField("FLOWNAME")
    private String flowname;

    @ApiModelProperty(value = "公司ID")
    @TableField("COMPANY")
    private String company;

      @ApiModelProperty(value = "部门ID")
      @TableField("DEPARTINCHARGE")
    private String departincharge;

      @ApiModelProperty(value = "使用范围")
      @TableField("FLOWRANGE")
    private String flowrange;

      @ApiModelProperty(value = "流程状态")
      @TableField("FLOWSTATUS")
    private String flowstatus;

      @ApiModelProperty(value = "备注")
      @TableField("MEMO")
    private String memo;

      @ApiModelProperty(value = "版本")
      @TableField("VERSION")
    private BigDecimal version;

    @TableField("FLOWCHART")
    private String flowchart;

      @ApiModelProperty(value = "业务参与部门")
      @TableField("DEPARTASSIST")
    private String departassist;

      @ApiModelProperty(value = "录入人")
      @TableField("EDITOR")
    private String editor;

      @ApiModelProperty(value = "更新时间")
      @TableField("UPDATETIME")
      @JSONField(format = "yyyy-MM-dd")
    private LocalDateTime updatetime;

    @TableField("RELATEDRULES")
    private String relatedrules;

    @TableField("AFFECTDEGREE")
    private String affectdegree;

    @TableField("INTERFACE")
    private String interfaced;

    @ApiModelProperty(value = "父流程ID")
    @TableField("FATHERFLOWID")
    private BigDecimal fatherflowid;

      @ApiModelProperty(value = "创建时间")
      @TableField("CREATETIME")
    private String createtime;

      @ApiModelProperty(value = "最后更改时间")
      @TableField("LASTMODIFIEDTIME")
    private String lastmodifiedtime;

    @TableField("FLOWBYSYSTEM")
    private Integer flowbysystem;

    @TableField("INFLOWDB")
    private BigDecimal inflowdb;

    @TableField("POSITION")
    private BigDecimal position;

    @TableField("VERSIONTYPE")
    private BigDecimal versiontype;

    @TableField("STATUS")
    @ApiModelProperty(value = "审批状态")
    private BigDecimal status;

    @TableField("SETTINGID")
    @ApiModelProperty(value = "系统流程Id")
    private String settingid;

    @TableField("FROMID")
    @ApiModelProperty(value = "表单ID")
    private BigDecimal fromid;

    @TableField("FIRINGSTATUS")
    @ApiModelProperty(value = "是否启用  1 启动 2弃用 null 未启动")
    private BigDecimal firingstatus;

    @TableField("EDITMODULE")
    @ApiModelProperty(value = "流程图Id")
    private String editmodule;

    @TableField("FLOWMAPPINGURL")
    @ApiModelProperty(value = "后台访问地址")
    private String flowmappingurl;

    @Transient
    private TblYwFromMySql tblywfrom;
}
